package com.baidu.location;

class Jni
{
  private static int a = 0;
  private static int b = 1;
  private static int c = 2;
  private static int d = 11;
  private static int e = 12;
  private static int f = 13;
  private static int g = 14;
  private static int h = 1024;
  private static boolean i = false;

  static
  {
    try
    {
      System.loadLibrary("locSDK3");
      return;
    }
    catch (UnsatisfiedLinkError localUnsatisfiedLinkError)
    {
      localUnsatisfiedLinkError.printStackTrace();
      i = true;
    }
  }

  public static String a(String paramString)
  {
    int j = 740;
    int k = 0;
    if (i)
      return "err!";
    paramString = paramString.getBytes();
    byte[] arrayOfByte = new byte[h];
    int l = paramString.length;
    if (l > 740);
    while (true)
    {
      l = 0;
      if (k < j)
      {
        if (paramString[k] != 0)
        {
          arrayOfByte[l] = paramString[k];
          l += 1;
        }
        while (true)
        {
          while (true)
            k += 1;
          ak.e();
        }
      }
      new StringBuilder("number:").append(paramString.length);
      ak.e();
      return a(arrayOfByte, 132456) + "|tp=3";
      j = l;
    }
  }

  private static native String a(byte[] paramArrayOfByte, int paramInt);

  public static double[] a(double paramDouble1, double paramDouble2, String paramString)
  {
    double[] arrayOfDouble = new double[2];
    double[] tmp7_5 = arrayOfDouble;
    tmp7_5[0] = 0.0D;
    double[] tmp11_7 = tmp7_5;
    tmp11_7[1] = 0.0D;
    tmp11_7;
    if (i)
      return tmp11_7;
    int j = -1;
    if (paramString.equals("bd09"))
      j = a;
    while (true)
    {
      ak.e();
      try
      {
        do
          while (true)
          {
            while (true)
            {
              while (true)
              {
                while (true)
                {
                  paramString = b(paramDouble1, paramDouble2, j, 132456).split(":");
                  tmp11_7[0] = Double.parseDouble(paramString[0]);
                  tmp11_7[1] = Double.parseDouble(paramString[1]);
                  return tmp11_7;
                  if (!(paramString.equals("bd09ll")))
                    break;
                  j = b;
                }
                if (!(paramString.equals("gcj02")))
                  break;
                j = c;
              }
              if (!(paramString.equals("gps2gcj")))
                break;
              j = d;
            }
            if (!(paramString.equals("bd092gcj")))
              break;
            j = e;
          }
        while (!(paramString.equals("bd09ll2gcj")));
        j = f;
      }
      catch (Exception paramString)
      {
        while (true)
          paramString.printStackTrace();
      }
    }
  }

  private static native String b(double paramDouble1, double paramDouble2, int paramInt1, int paramInt2);
}